<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<title th:text="'用户登录-'+${projectName}"></title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" type="text/css" th:href="@{/bootstrap/css/bootstrap.min.css}">
	<style type="text/css">
	.login-panel {
		margin : 20px 10px;
	}
	.login-panel .input-group {
		margin-bottom: 10px;
	}
	@media (min-width: 500px) {
		.login-panel {
			width : 500px;
			margin : 20px auto;
		}
	}
	</style>
</head>
<body>
	<div class="panel panel-primary login-panel">
		<div class="panel-heading">
			用户登录
		</div>
		<div class="panel-body">
			<form th:action="@{/login}" method="post" th:object="${form}">
				<div class="alert alert-warning" th:if="${#fields.hasAnyErrors()}">
					<th:block th:each="err,state : ${#fields.allErrors()}" th:text="${state.last} ? ${err} : ${err}+','"></th:block>
				</div>
				<div class="input-group">
  					<span class="input-group-addon">
  						<span class="glyphicon glyphicon-user"></span>
  					</span>
  					<input type="text" th:field="*{username}" class="form-control" placeholder="请输入用户名">
				</div>
				<div class="input-group">
					<span class="input-group-addon">
  						<span class="glyphicon glyphicon-lock"></span>
  					</span>
  					<input type="password" th:field="*{password}" class="form-control" placeholder="请输入密码">
				</div>
				<div>
					<button type="submit" class="btn btn-primary btn-block">
						<span class="glyphicon glyphicon-log-in"></span>
						<span style="padding-left: 10px;">登录</span>
					</button>
					<a th:href="@{/system_login}" class="btn btn-default btn-block">管理员登录</a>
				</div>
			</form>
		</div>
	</div>
	<script th:src="@{/jquery/{version}/jquery.js(version=${jqueryVersion})}"></script>
	<script th:src="@{/bootstrap/js/bootstrap.min.js}"></script>
</body>
</html>